package cn.kgc.rediscache.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.cache.interceptor.KeyGenerator;

import java.lang.reflect.Method;


@Configuration
public class MyCacheConfig {
    @Bean(value = "myKeyGenerator")
    public KeyGenerator KeyGeneratro(){
        return new KeyGenerator() {
            @Override
            public Object generate(Object target, Method method, Object... params) {
                return params;
            }
        };
    }
}
